#include "SMPPDestBearerType.hpp"

using namespace smpp::pdu;

DestBearerType::DestBearerType(const quint8 nValue):
TLV(TLVtags::TAG_DEST_BEARER_TYPE,1),_Value(nValue){}

DestBearerType::DestBearerType(const DestBearerType &nDestBearerType):
TLV(nDestBearerType),_Value(nDestBearerType.getValue()){}

bool DestBearerType::operator ==(
	const DestBearerType &nDestBearerType) const{
	return (TLV::operator == (nDestBearerType) && 
			_Value == nDestBearerType.getValue());
}

bool DestBearerType::operator !=(
	const DestBearerType &nDestBearerType) const{
	return !this->operator == (nDestBearerType);
}

DestBearerType &DestBearerType::operator = (
	const DestBearerType &nDestBearerType){
	if(*this == nDestBearerType)
		return *this;
	TLV::operator = (nDestBearerType);
	_Value = nDestBearerType.getValue();
	return *this;
}

void DestBearerType::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 DestBearerType::getValue() const{
	return _Value;
}
